<template>
    <view>

        <!-- <div class="loading-overlay">
                <div class="loading-bar" id="loadingBar"></div>
            </div> -->
        <a-descriptions title="基本信息" bordered>
            <a-descriptions-item label="井名">{{ allData?.wellId || "---" }}</a-descriptions-item>
            <a-descriptions-item label="井别">{{ allData?.wellCategory || "---" }}</a-descriptions-item>
            <a-descriptions-item label="井型">{{ allData?.wellType || "---" }}</a-descriptions-item>
            <a-descriptions-item label="甲方单位">{{ allData?.customerName || "---" }}</a-descriptions-item>
            <a-descriptions-item label="钻井队号">{{ allData?.drillingUnit || "---" }}</a-descriptions-item>
            <a-descriptions-item label="完钻井深(m)">{{ allData?.maximumDepth || "---" }}</a-descriptions-item>
            <a-descriptions-item label="地理位置">{{ allData?.wellLocation || "---" }}</a-descriptions-item>
            <a-descriptions-item label="构造位置">{{ allData?.tectonicSetting || "---" }}</a-descriptions-item>
            <a-descriptions-item label="最大井斜">{{ allData?.maximumInclination || "---" }}</a-descriptions-item>
            <a-descriptions-item label="地面海拔(m)">{{ allData?.groundElevation || "---" }}</a-descriptions-item>
            <a-descriptions-item label="地补距(m)">{{ allData?.compensationDistance || "---" }}</a-descriptions-item>
            <a-descriptions-item label="有毒有害气体">{{ allData?.hazardousGas || "---" }}</a-descriptions-item>
            <a-descriptions-item label="井底温度(℃)">{{ allData?.bottomTemperature || "---" }}</a-descriptions-item>
            <a-descriptions-item label="井底压力(MPa)">{{ allData?.bottomPressure || "---" }}</a-descriptions-item>
            <a-descriptions-item label="安全作业时间(h)">{{ allData?.safetyTime || "---" }}</a-descriptions-item>
        </a-descriptions>
        <a-descriptions title="钻头程序" bordered>
            <!-- <a-descriptions-item label="钻头名称" v-for="(drillItem, index) in allData.drillInformationList" :key="index">
                {{ drillItem.name || "---" }}
            </a-descriptions-item>
            <a-descriptions-item label="直径" v-for="(drillItem, index) in allData.drillInformationList" :key="index">
                {{ drillItem.diameter || "---" }}
            </a-descriptions-item>
            <a-descriptions-item label="深度" v-for="(drillItem, index) in allData.drillInformationList" :key="index">
                {{ drillItem.deep || "---" }}
            </a-descriptions-item> -->
            <a-descriptions-item v-for="(drillItem, index) in allData.drillInformationList" :key="index">
                <p>钻头名称: {{ drillItem?.name || "---" }}</p>
                <p>直径: {{ drillItem?.diameter || "---" }}</p>
                <p>深度: {{ drillItem?.deep || "---" }}</p>
            </a-descriptions-item>
            <!-- <view v-for="(item, index) in allData.drillInformationList" :key="index">
                <a-descriptions-item label="钻头名称">{{ item.name || "---" }}</a-descriptions-item>
                <a-descriptions-item label="直径">{{ item.diameter || "---" }}</a-descriptions-item>
                <a-descriptions-item label="深度">{{ item.deep || "---" }}</a-descriptions-item>
            </view> -->
        </a-descriptions>
        <a-descriptions title="套管程序" bordered>
            <a-descriptions-item v-for="(casingItem, index) in allData.casingList" :key="index">
                <p>钻头名称: {{ casingItem?.name || "---" }}</p>
                <p>直径: {{ casingItem?.diameter || "---" }}</p>
                <p>深度: {{ casingItem?.deep || "---" }}</p>
            </a-descriptions-item>
        </a-descriptions>
        <!-- <a-descriptions title="其他" bordered>
            <a-descriptions-item label="风险井段">{{ }}</a-descriptions-item>
            <a-descriptions-item label="钻井异常简报">{{ }}</a-descriptions-item>
        </a-descriptions> -->
        <a-descriptions title="作业人员与车辆" bordered>
            <a-descriptions-item label="队伍编号">{{ allData?.teamNumber || "---" }}</a-descriptions-item>
            <a-descriptions-item label="队伍资质">{{ allData?.teamQualification || "---" }}</a-descriptions-item>
            <a-descriptions-item label="车辆号牌">{{ allData?.vehicleNumber || "---" }}</a-descriptions-item>
        </a-descriptions>
        <a-descriptions title="泥浆参数" bordered>
                <a-descriptions-item label="泥浆性质">{{ allData.mudParameters?.properties || "---" }}</a-descriptions-item>
                <a-descriptions-item label="密度(g/cm³)">{{ allData.mudParameters?.density || "---" }}</a-descriptions-item>
                <a-descriptions-item label="粘度(s)">{{ allData.mudParameters?.viscosity || "---" }}</a-descriptions-item>
                <a-descriptions-item label="PH值">{{ allData.mudParameters?.ph || "---" }}</a-descriptions-item>
                <a-descriptions-item label="失水率(CC/mL/30min)">{{ allData.mudParameters?.waterLossRate || "---" }}</a-descriptions-item>
            </a-descriptions>
        <!-- <a-descriptions title="HSE设备设施：有毒有害检测仪" bordered>
                <a-descriptions-item label="规格型号">{{ allData.hseList[0].specification }}</a-descriptions-item>
                <a-descriptions-item label="数量">{{ allData.hseList[0].numbers }}</a-descriptions-item>
                <a-descriptions-item label="设备状况">{{ allData.hseList[0].condition }}</a-descriptions-item>
            </a-descriptions>
            <a-descriptions title="HSE设备设施：伽马射线探测仪" bordered>
                <a-descriptions-item label="规格型号">{{ allData.hseList[1].specification }}</a-descriptions-item>
                <a-descriptions-item label="数量">{{ allData.hseList[1].numbers }}</a-descriptions-item>
                <a-descriptions-item label="设备状况">{{ allData.hseList[1].condition }}</a-descriptions-item>
            </a-descriptions>
            <a-descriptions title="HSE设备设施：正压式空气呼吸器" bordered>
                <a-descriptions-item label="规格型号">{{ allData.hseList[2].specification }}</a-descriptions-item>
                <a-descriptions-item label="数量">{{ allData.hseList[2].numbers }}</a-descriptions-item>
                <a-descriptions-item label="设备状况">{{ allData.hseList[2].condition }}</a-descriptions-item>
            </a-descriptions>
            <a-descriptions title="HSE设备设施：灭火器" bordered>
                <a-descriptions-item label="规格型号">{{ allData.hseList[3].specification }}</a-descriptions-item>
                <a-descriptions-item label="数量">{{ allData.hseList[3].numbers }}</a-descriptions-item>
                <a-descriptions-item label="设备状况">{{ allData.hseList[3].condition }}</a-descriptions-item>
            </a-descriptions>
            <a-descriptions title="HSE设备设施：电缆悬挂器" bordered>
                <a-descriptions-item label="规格型号">{{ allData.hseList[4].specification }}</a-descriptions-item>
                <a-descriptions-item label="数量">{{ allData.hseList[4].numbers }}</a-descriptions-item>
                <a-descriptions-item label="设备状况">{{ allData.hseList[4].condition }}</a-descriptions-item>
            </a-descriptions> -->
        <a-descriptions title="测井项目" bordered>
            <a-descriptions-item v-for="(loggingItem, index) in allData.loggingContentList" :key="index">
                <p>测量井段: {{ loggingItem?.wellSection || "---" }}</p>
                <p>测量内容: {{ loggingItem?.content || "---" }}</p>
                <p>比例: {{ loggingItem?.proportion || "---" }}</p>
            </a-descriptions-item>
        </a-descriptions>
        <a-descriptions title="电缆信息" bordered>
                <a-descriptions-item label="规格型号">{{ allData.cableInformation?.specification || "---" }}</a-descriptions-item>
                <a-descriptions-item label="电缆长度(m)">{{ allData.cableInformation?.length || "---" }}</a-descriptions-item>
                <a-descriptions-item label="启用时间">{{ allData.cableInformation?.startDate || "---" }}</a-descriptions-item>
                <a-descriptions-item label="拉断力试验日期">{{ allData.cableInformation?.tensileDate || "---" }}</a-descriptions-item>
                <a-descriptions-item label="拉断力值(kN)">{{ allData.cableInformation?.tensileValue || "---" }}</a-descriptions-item>
                <a-descriptions-item label="拼接位置(m)">{{ allData.cableInformation?.splicingPosition || "---" }}</a-descriptions-item>
                <a-descriptions-item label="标定/校深日期">{{ allData.cableInformation?.revisionDeepDate || "---" }}</a-descriptions-item>
                <a-descriptions-item label="标定/校深后下井次数">{{
                    allData.cableInformation?.revisionDeepTimes || "---" }}</a-descriptions-item>
            </a-descriptions>
            <!-- <a-descriptions title="测井复杂处置工具" bordered>
                <a-descriptions-item label="工具名称">{{ allData.complexToolsList }}</a-descriptions-item>
                <a-descriptions-item label="规格型号">{{ allData.complexToolsList }}</a-descriptions-item>
                <a-descriptions-item label="数量">{{ allData.complexToolsList }}</a-descriptions-item>
                <a-descriptions-item label="工具状况">{{ allData.complexToolsList }}</a-descriptions-item>
            </a-descriptions>
            <a-descriptions title="安全风险与防范措施" bordered>
                <a-descriptions-item label="风险描述">{{ allData.riskPreventionList }}</a-descriptions-item>
                <a-descriptions-item label="防范措施">{{ allData.riskPreventionList }}</a-descriptions-item>
            </a-descriptions> -->

    </view>
</template>
<script setup>
import { getDataOne } from '@/api/design/schemes.js'
import { queryList } from '@/api/well/well.js';
const allData = ref([])
const drillInformationList = ref([]);
const queryParams = ref({
    pageSize: 10,
    pageNum: 1
})
const props = defineProps({
    value: {
        type: String
    }
})
// 查询数据
function getList() {
    let id = props.value
    getDataOne(id).then(res => {
        console.log('detail--wellData', res)
        allData.value = res;
    })
}
// const tableData = computed(() => {
//     return allData.value.slice((queryParams.value.pageNum - 1) * queryParams.value.pageSize, queryParams.value.pageSize * queryParams.value.pageNum)
// })
getList();
</script>
<style scoped>
.loading-overlay {
    position: relative;
    width: 100%;
    height: 2px;
    background: #f4f4f4;
}

.loading-bar {
    width: 0;
    height: 100%;
    background: #007BFF;
    animation: loading 2s linear infinite;
    /* 使用动画模拟加载进度 */
}

@keyframes loading {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}
</style>